home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / TextEvent.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  77 lines

  1. /*
  2.  * @(#)TextEvent.java    1.5 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt.event;
  16.  
  17. import java.awt.AWTEvent;
  18. import java.awt.Event;
  19.  
  20. /**
  21.  * The text event emitted by TextComponents.
  22.  * @see java.awt.TextComponent
  23.  * @see TextEventListener
  24.  *
  25.  * @version 1.5 07/01/98
  26.  * @author Georges Saab
  27.  */
  28.  
  29. public class TextEvent extends AWTEvent {
  30.  
  31.     /**
  32.      * Marks the first integer id for the range of adjustment event ids.
  33.      */
  34.     public static final int TEXT_FIRST     = 900;
  35.  
  36.     /**
  37.      * Marks the last integer id for the range of adjustment event ids.
  38.      */
  39.     public static final int TEXT_LAST     = 900;
  40.  
  41.     /**
  42.      * The adjustment value changed event.
  43.      */
  44.     public static final int TEXT_VALUE_CHANGED    = TEXT_FIRST;
  45.  
  46.     /*
  47.      * JDK 1.1 serialVersionUID 
  48.      */
  49.     private static final long serialVersionUID = 6269902291250941179L;
  50.  
  51.     /**
  52.      * Constructs a TextEvent object with the specified TextComponent source,
  53.      * and type.
  54.      * @param source the TextComponent where the event originated
  55.      * @id the event type
  56.      * @type the textEvent type 
  57.      */
  58.     public TextEvent(Object source, int id) {
  59.         super(source, id);
  60.     }
  61.  
  62.  
  63.     public String paramString() {
  64.         String typeStr;
  65.         switch(id) {
  66.           case TEXT_VALUE_CHANGED:
  67.               typeStr = "TEXT_VALUE_CHANGED";
  68.               break;
  69.           default:
  70.               typeStr = "unknown type";
  71.         }
  72.         return typeStr;
  73.     }
  74. }
  75.  
  76.  
  77.